home *** CD-ROM | disk | FTP | other *** search
- #include "stdafx.h"
-
- cPushable::cPushable(int _x, int _y, cProperties *_orig)
- : cWeapon(_x, _y, _orig, "MOVING")
- {
- }
-
- cPushable::~cPushable()
- {
- }
-
- int cPushable::control()
- {
- cWeapon::control();
-
- bounce_on_boundaries();
-
- // Kill object when we hit something or go off screen
-
- return !((abs(vx) > (fix)5 || !resting) && check_radial_hit_one(circle_bounds)) && !in_water();
- }
-
- void cPushable::hit(fix dir, cWeapon *w)
- {
- add_angular_speed(5 * w->push_power, dir);
- }
-